package com.boot.mgt.dao.oracle

import com.boot.mgt.model.OracleTAcdFile
import com.boot.mgt.model.vo.*
import org.apache.ibatis.annotations.Param
import org.springframework.stereotype.Repository
import tk.mybatis.mapper.common.Mapper

/**
 * @author kawins
 * createTime 2018-12-09 19:15
 */
@Repository
interface OracleTAcdFileMapper : Mapper<OracleTAcdFile> {

    fun selectAccidentCount(@Param("startTime") startTime: String,
                            @Param("endTime") endTime: String,
                            @Param("deathStart") deathStart: Int,
                            @Param("deathEnd") deathEnd: Int,
                            @Param("formatter") formatter: String,
                            @Param("acdTableName") acdTableName: String): StatisticsCountVo


    fun selectAccidentCountGroup(@Param("deathStart") deathStart: Int,
                                 @Param("deathEnd") deathEnd: Int,
                                 @Param("stepCount") stepCount: Int,
                                 @Param("formatter") formatter: String,
                                 @Param("acdTableName") acdTableName: String): List<StatisticsCountVo>

    fun selectVehicleTypeAmountGroup(
            @Param("acdTableName") acdTableName: String,
            @Param("codeTableName") codeTableName: String,
            @Param("acdFileHumanTableName") acdFileHumanTableName: String,
            @Param("beginDateStr") beginDateStr: String,
            @Param("endDateStr") endDateStr: String,
            @Param("limitAmount") limitAmount: Int
    ):List<VehicleTypeAmountVo>

    fun selectAccidentCauseDeathAmountGroup(
            @Param("acdTableName") acdTableName: String,
            @Param("codeTableName") codeTableName: String,
            @Param("beginDateStr") beginDateStr: String,
            @Param("endDateStr") endDateStr: String,
            @Param("limitAmount") limitAmount: Int
    ):List<AccidentCauseDeathAmountVo>

    fun selectAccidentCLSYXZAmountGroup(
            @Param("acdTableName") acdTableName: String,
            @Param("codeTableName") codeTableName: String,
            @Param("acdFileHumanTableName") acdFileHumanTableName: String,
            @Param("beginDateStr") beginDateStr: String,
            @Param("endDateStr") endDateStr: String,
            @Param("limitAmount") limitAmount: Int
    ):List<AccidentCLSYXZAmountVo>

    fun selectAccidentTQAmountGroup(
            @Param("acdTableName") acdTableName: String,
            @Param("codeTableName") codeTableName: String,
            @Param("beginDateStr") beginDateStr: String,
            @Param("endDateStr") endDateStr: String,
            @Param("limitAmount") limitAmount: Int
    ):List<AccidentTQAmountVo>


    fun selectAccidentHoursAmountGroup(
            @Param("acdTableName") acdTableName: String,
            @Param("beginDateStr") beginDateStr: String,
            @Param("endDateStr") endDateStr: String
    ):List<AccidentHoursAmountVo>

    fun selectAccidentSGXTAmountGroup(
            @Param("acdTableName") acdTableName: String,
            @Param("codeTableName") codeTableName: String,
            @Param("beginDateStr") beginDateStr: String,
            @Param("endDateStr") endDateStr: String,
            @Param("limitAmount") limitAmount: Int
    ):List<AccidentSGXTAmountVo>

    fun selectAccidentDLLXAmountGroup(
            @Param("acdTableName") acdTableName: String,
            @Param("codeTableName") codeTableName: String,
            @Param("beginDateStr") beginDateStr: String,
            @Param("endDateStr") endDateStr: String,
            @Param("limitAmount") limitAmount: Int
    ): List<AccidentDLLXDeathAmountVo>

    fun selectByReport(map: MutableMap<String, Any>): List<OracleTAcdFile>

    fun selectOneByDjbh(@Param("djbh") djbh: String): OracleTAcdFile
    //xiaying  查询acdFile列表

     fun selectByXzqhh(@Param("xzqh") xzqh: String?): List<OracleTAcdFile>
    //xiaying  end
}
